package com.example.lay.broadcastreceive;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

/**
 * Created by Lay on 2014/12/10.
 */
public class MyBroadcastReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String msg = intent.getStringExtra("msg");
        Toast.makeText(context, "发送消息的Action是：" + intent.getAction() + "\n" + "接收到的消息是：" + msg,
                Toast.LENGTH_SHORT).show();
    }
}
